import store from "@/store";
import ButtonWifiFunction from "./ButtonWifiFunction";
import { dealSupplyRequest } from './ButtonSupplyFunction';
import ButtonCleanFunction from './ButtonCleanFunction';

export function ConfirmExecute(roomNumber){
    store.dispatch('sendRoomNumber', roomNumber);
    let request = store.getters.getPriorRequest;

    switch(request){
        case 'wifi密码': ButtonWifiFunction.wifiPassword(); break;
        case 'wifi报修': ButtonWifiFunction.wifiRepair(); break;
        case '打扫服务': ButtonCleanFunction.dealCleanRequest(); break;
        default: dealSupplyRequest(request); break; 
    }
}